let crypto = require('crypto');
let fs = require('fs');
//密码加密
exports.encryptPWD =  async function(pwd){
  let  pwdMd5 = crypto.createHash('md5').update(pwd).digest('hex');
    return pwdMd5;
};

//读取json 文件配置

exports.getConfig  =  function () {
    let  configJson = fs.readFileSync(__dirname +'/../config/config.json');
     let configData =JSON.parse(configJson);
    return configData;
}

